//
//  Common.swift
//  MySinaWeiBoSwiftProject
//
//  Created by apple on 2016/11/15.
//  Copyright © 2016年 WangChen. All rights reserved.
//

import UIKit



//几个网络访问需要的参数
let appKey = "968893354"
let appSecret = "20d949c41d223f282ac4336ccca7b405"
let redirectUrl = "http://bbs.itheima.com/forum.php"

//用户token接口
let tokenUrlStr = "https://api.weibo.com/oauth2/access_token"
//用户信息接口
let userShowUrlStr = "https://api.weibo.com/2/users/show.json"
//用户微博接口
let homeUrlStr = "https://api.weibo.com/2/statuses/home_timeline.json"

//发送一条纯文本微博
let sendWeiboStr = "https://api.weibo.com/2/statuses/update.json"
//发送一条带图片的微博
let sendImageWeiboStr = "https://upload.api.weibo.com/2/statuses/upload.json"


//屏幕宽度
let screenWidth = UIScreen.main.bounds.width
let screenHeight = UIScreen.main.bounds.height

//导航栏高度
let guideBarHeight: CGFloat = 64



//沙盒Document   用户账号存储路径
let accountPath = (NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).last! as NSString).appendingPathComponent("account.plist")


//发送更改根控制器的通知
let changeRootVCNotification = "changeRootVCNotification"

//随机颜色
func randomColor()->(UIColor){
    
    let r: CGFloat = CGFloat(arc4random_uniform(256))/255.0
    let g: CGFloat = CGFloat(arc4random_uniform(256))/255.0
    let b: CGFloat = CGFloat(arc4random_uniform(256))/255.0
    
    return UIColor.init(red: r, green: g, blue: b, alpha: 1)
}

